<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>

<jsFileName><!--js/pageJS/page_pubOffice.js--></jsFileName>
<s:form id="query_pubOffice_list_form" name="query_pubOffice_list_form" method="post" action="pubOffice/list.do">
<div  class="con_wrap_padding">
	<div class="trans_operate_box clearfix">
		<div class="operate_btns">			
			<a class="btn_short" href="javascript:void(0)" title="新建" onClick="Ext.milan.pagejs.page_pubOffice.showAddForm();">新 建</a>
		</div>
		<div class="trans_type_search">
			标题：<s:textfield name="name" id="name_office" size="10"/>
	    	类别：<mytag:select id="lb_office" title="请输入类别" name="lb" sql="basedata" isSql="false" condition="1" dataType="Long" listKey="id" listValue="name" headerKey="" headerValue="请选择"/>
	    	<a class="btn_short" name="button" id="button" href="javascript:void(0)" title="搜索" onclick="QueryOfficeListUtils.query()">搜索</a>
		</div>   
	</div>
	<table id="dataGridTable_template" width="98%" class="dhtmlxGrid" imgpath="skins/default/images/dhtmlx/" lightnavigation="true" style="table-layout:fixed">
		<tr>
			<td align="center" width="27%">主题</td>
			<td align="center">类别</td>
			<td align="center">发布部门</td>
			<td align="center">备注</td>
			<td align="center">时间</td>
			<td align="center" width="20%">操作</td>
		</tr>
		<c:forEach items="${page.result}" var="item" varStatus="status">
		<tr>
			<td align="left"><span title="${item.name}">${item.name}</span></td>
			<td align="left">${item.categoryName}</td>
			<td align="left">${item.fbbm}</td>
			<td align="left"><span title="${item.memo}">${item.memo}</span></td>
			<td align="left"><c:out value='${item.uptimeString}'/>&nbsp;</td>
			<td align="center">
				<a href="#" onclick="Ext.milan.pagejs.page_pubOffice.viewDetail('${item.id}')"><img src="skins/default/images/icons/ico-view.gif" />查看</a>&nbsp;
				<a href="#" onclick="Ext.milan.pagejs.page_pubOffice.showEditForm('${item.id}')"><img src="skins/default/images/icons/ico-edit.gif" />编辑</a>&nbsp;
				<a href="#" onclick="Ext.milan.pagejs.page_pubOffice.deleteForm('${item.id}')"><img src="skins/default/images/icons/ico-delete.gif" />删除</a>&nbsp;
			</td>
			
		</tr>
		</c:forEach>
		
		<c:if test="${fn:length(page.result)==0}">
		<tr>
	    	<td colspan="5"><div class="note_red_in_div">系统没有查找到符合条件的数据！</div></td>
	    </tr>
	    </c:if>
	</table>
	<input type="hidden" name="pageNumber" value="${page.thisPageNumber}"/>
	<input type="hidden" name="pageSize" value="${page.pageSize}"/>
	<simpletable:pagingToolbar page="${page}"/>
 	</div>
</s:form>
<script type="text/javascript">;
	QueryOfficeListUtils = {};
	
	/**
	 * 条件查询
	 */
	QueryOfficeListUtils.query = function() {
		
		//强行设置当前页为第一页
		var currentPage = $("query_pubOffice_list_form").pageNo;
		if(currentPage) 
			currentPage.value = 1;
		
		Ext.milan.pagejs.page_pubOffice.query();
	};
	
</script>